package com.glsc.ngateway.platform.repo.costallocation;

import com.glsc.ngateway.platform.domain.costallocation.HisIpDetailInfo;
import com.glsc.ngateway.platform.domain.costallocation.IpDetailInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface HisIpDetailInfoRepo extends JpaRepository<HisIpDetailInfo, Long>, JpaSpecificationExecutor<HisIpDetailInfo> {
    @Query(value = "select u  from HisIpDetailInfo u where u.ipInfoId in :ipInfoIdSet")
    List<HisIpDetailInfo> queryByHisIpInfoIds(Set<Long> ipInfoIdSet);

    @Query(value = "select u  from HisIpDetailInfo u where u.ipInfoId = :ipInfoId")
    List<HisIpDetailInfo> queryByHisIpInfoId(Long ipInfoId);
    @Query(value = "select u  from HisIpDetailInfo u where u.systemClassNo in :systemClassNo")
    List<HisIpDetailInfo> queryBysystemClassNo(@Param("systemClassNo") String systemClassNo);
}
